package com.hm.jiaowuxitong.util;

import javax.swing.*;
import java.awt.*;

public class UIUtil {

    public void center(JFrame frame,int frame_width,int frame_height){
        Toolkit kit = Toolkit.getDefaultToolkit();
        Dimension size = kit.getScreenSize();
        int x=(size.width-frame_width)/2;
        int y=(size.height-frame_height)/2;
        frame.setLocation(x,y);
    }
}
